<!DOCTYPE html>

<html>

<head>

<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<meta http-equiv="X-UA-Compatible" content="IE=EDGE" />

<meta name="viewport" content="width=device-width, initial-scale=1" />

<meta name="author" content="Stefano Mangiola" />

<meta name="date" content="2020-08-07" />

<title>Overview of the tidyHeatmap package</title>

<script>// Hide empty <a> tag within highlighted CodeBlock for screen reader accessibility (see https://github.com/jgm/pandoc/issues/6352#issuecomment-626106786) -->
// v0.0.1
// Written by JooYoung Seo (jooyoung@psu.edu) and Atsushi Yasumoto on June 1st, 2020.

document.addEventListener('DOMContentLoaded', function() {
  const codeList = document.getElementsByClassName("sourceCode");
  for (var i = 0; i < codeList.length; i++) {
    var linkList = codeList[i].getElementsByTagName('a');
    for (var j = 0; j < linkList.length; j++) {
      if (linkList[j].innerHTML === "") {
        linkList[j].setAttribute('aria-hidden', 'true');
      }
    }
  }
});
</script>


<style type="text/css">code{white-space: pre;}</style>
<style type="text/css" data-origin="pandoc">
code.sourceCode > span { display: inline-block; line-height: 1.25; }
code.sourceCode > span { color: inherit; text-decoration: inherit; }
code.sourceCode > span:empty { height: 1.2em; }
.sourceCode { overflow: visible; }
code.sourceCode { white-space: pre; position: relative; }
div.sourceCode { margin: 1em 0; }
pre.sourceCode { margin: 0; }
@media screen {
div.sourceCode { overflow: auto; }
}
@media print {
code.sourceCode { white-space: pre-wrap; }
code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
}
pre.numberSource code
  { counter-reset: source-line 0; }
pre.numberSource code > span
  { position: relative; left: -4em; counter-increment: source-line; }
pre.numberSource code > span > a:first-child::before
  { content: counter(source-line);
    position: relative; left: -1em; text-align: right; vertical-align: baseline;
    border: none; display: inline-block;
    -webkit-touch-callout: none; -webkit-user-select: none;
    -khtml-user-select: none; -moz-user-select: none;
    -ms-user-select: none; user-select: none;
    padding: 0 4px; width: 4em;
    color: #aaaaaa;
  }
pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa;  padding-left: 4px; }
div.sourceCode
  {   }
@media screen {
code.sourceCode > span > a:first-child::before { text-decoration: underline; }
}
code span.al { color: #ff0000; font-weight: bold; } /* Alert */
code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
code span.at { color: #7d9029; } /* Attribute */
code span.bn { color: #40a070; } /* BaseN */
code span.bu { } /* BuiltIn */
code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
code span.ch { color: #4070a0; } /* Char */
code span.cn { color: #880000; } /* Constant */
code span.co { color: #60a0b0; font-style: italic; } /* Comment */
code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
code span.do { color: #ba2121; font-style: italic; } /* Documentation */
code span.dt { color: #902000; } /* DataType */
code span.dv { color: #40a070; } /* DecVal */
code span.er { color: #ff0000; font-weight: bold; } /* Error */
code span.ex { } /* Extension */
code span.fl { color: #40a070; } /* Float */
code span.fu { color: #06287e; } /* Function */
code span.im { } /* Import */
code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
code span.kw { color: #007020; font-weight: bold; } /* Keyword */
code span.op { color: #666666; } /* Operator */
code span.ot { color: #007020; } /* Other */
code span.pp { color: #bc7a00; } /* Preprocessor */
code span.sc { color: #4070a0; } /* SpecialChar */
code span.ss { color: #bb6688; } /* SpecialString */
code span.st { color: #4070a0; } /* String */
code span.va { color: #19177c; } /* Variable */
code span.vs { color: #4070a0; } /* VerbatimString */
code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */

</style>
<script>
// apply pandoc div.sourceCode style to pre.sourceCode instead
(function() {
  var sheets = document.styleSheets;
  for (var i = 0; i < sheets.length; i++) {
    if (sheets[i].ownerNode.dataset["origin"] !== "pandoc") continue;
    try { var rules = sheets[i].cssRules; } catch (e) { continue; }
    for (var j = 0; j < rules.length; j++) {
      var rule = rules[j];
      // check if there is a div.sourceCode rule
      if (rule.type !== rule.STYLE_RULE || rule.selectorText !== "div.sourceCode") continue;
      var style = rule.style.cssText;
      // check if color or background-color is set
      if (rule.style.color === '' && rule.style.backgroundColor === '') continue;
      // replace div.sourceCode by a pre.sourceCode rule
      sheets[i].deleteRule(j);
      sheets[i].insertRule('pre.sourceCode{' + style + '}', j);
    }
  }
})();
</script>



<style type="text/css">body {
background-color: #fff;
margin: 1em auto;
max-width: 700px;
overflow: visible;
padding-left: 2em;
padding-right: 2em;
font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 14px;
line-height: 1.35;
}
#TOC {
clear: both;
margin: 0 0 10px 10px;
padding: 4px;
width: 400px;
border: 1px solid #CCCCCC;
border-radius: 5px;
background-color: #f6f6f6;
font-size: 13px;
line-height: 1.3;
}
#TOC .toctitle {
font-weight: bold;
font-size: 15px;
margin-left: 5px;
}
#TOC ul {
padding-left: 40px;
margin-left: -1.5em;
margin-top: 5px;
margin-bottom: 5px;
}
#TOC ul ul {
margin-left: -2em;
}
#TOC li {
line-height: 16px;
}
table {
margin: 1em auto;
border-width: 1px;
border-color: #DDDDDD;
border-style: outset;
border-collapse: collapse;
}
table th {
border-width: 2px;
padding: 5px;
border-style: inset;
}
table td {
border-width: 1px;
border-style: inset;
line-height: 18px;
padding: 5px 5px;
}
table, table th, table td {
border-left-style: none;
border-right-style: none;
}
table thead, table tr.even {
background-color: #f7f7f7;
}
p {
margin: 0.5em 0;
}
blockquote {
background-color: #f6f6f6;
padding: 0.25em 0.75em;
}
hr {
border-style: solid;
border: none;
border-top: 1px solid #777;
margin: 28px 0;
}
dl {
margin-left: 0;
}
dl dd {
margin-bottom: 13px;
margin-left: 13px;
}
dl dt {
font-weight: bold;
}
ul {
margin-top: 0;
}
ul li {
list-style: circle outside;
}
ul ul {
margin-bottom: 0;
}
pre, code {
background-color: #f7f7f7;
border-radius: 3px;
color: #333;
white-space: pre-wrap; 
}
pre {
border-radius: 3px;
margin: 5px 0px 10px 0px;
padding: 10px;
}
pre:not([class]) {
background-color: #f7f7f7;
}
code {
font-family: Consolas, Monaco, 'Courier New', monospace;
font-size: 85%;
}
p > code, li > code {
padding: 2px 0px;
}
div.figure {
text-align: center;
}
img {
background-color: #FFFFFF;
padding: 2px;
border: 1px solid #DDDDDD;
border-radius: 3px;
border: 1px solid #CCCCCC;
margin: 0 5px;
}
h1 {
margin-top: 0;
font-size: 35px;
line-height: 40px;
}
h2 {
border-bottom: 4px solid #f7f7f7;
padding-top: 10px;
padding-bottom: 2px;
font-size: 145%;
}
h3 {
border-bottom: 2px solid #f7f7f7;
padding-top: 10px;
font-size: 120%;
}
h4 {
border-bottom: 1px solid #f7f7f7;
margin-left: 8px;
font-size: 105%;
}
h5, h6 {
border-bottom: 1px solid #ccc;
font-size: 105%;
}
a {
color: #0033dd;
text-decoration: none;
}
a:hover {
color: #6666ff; }
a:visited {
color: #800080; }
a:visited:hover {
color: #BB00BB; }
a[href^="http:"] {
text-decoration: underline; }
a[href^="https:"] {
text-decoration: underline; }

code > span.kw { color: #555; font-weight: bold; } 
code > span.dt { color: #902000; } 
code > span.dv { color: #40a070; } 
code > span.bn { color: #d14; } 
code > span.fl { color: #d14; } 
code > span.ch { color: #d14; } 
code > span.st { color: #d14; } 
code > span.co { color: #888888; font-style: italic; } 
code > span.ot { color: #007020; } 
code > span.al { color: #ff0000; font-weight: bold; } 
code > span.fu { color: #900; font-weight: bold; } 
code > span.er { color: #a61717; background-color: #e3d2d2; } 
</style>




</head>

<body>




<h1 class="title toc-ignore">Overview of the tidyHeatmap package</h1>
<h4 class="author">Stefano Mangiola</h4>
<h4 class="date">2020-08-07</h4>



<p>Tidy heatmap. This package is a tidy wrapper of the package <a href="https://bioconductor.org/packages/release/bioc/html/ComplexHeatmap.html">ComplexHeatmap</a>. The goal of this package is to interface tidy data frames with this powerful tool.</p>
<p><strong>Advantages:</strong></p>
<ul>
<li>Modular annotation with just specifying column names</li>
<li>Custom grouping of rows is easy to specify providing a grouped tbl. For example <code>df %&gt;% group_by(...)</code></li>
<li>Labels size adjusted by row and column total number</li>
<li>Default use of Brewer and Viridis palettes</li>
</ul>
<div id="functionsutilities-available" class="section level2">
<h2>Functions/utilities available</h2>
<table>
<thead>
<tr class="header">
<th>Function</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><code>heatmap</code></td>
<td>Plot base heatmap</td>
</tr>
<tr class="even">
<td><code>add_tile</code></td>
<td>Add tile annotation to the heatmap</td>
</tr>
<tr class="odd">
<td><code>add_point</code></td>
<td>Add point annotation to the heatmap</td>
</tr>
<tr class="even">
<td><code>add_bar</code></td>
<td>Add bar annotation to the heatmap</td>
</tr>
<tr class="odd">
<td><code>add_line</code></td>
<td>Add line annotation to the heatmap</td>
</tr>
<tr class="even">
<td><code>save_pdf</code></td>
<td>Save the PDF of the heatmap</td>
</tr>
</tbody>
</table>
</div>
<div id="installation" class="section level2">
<h2>Installation</h2>
<p>To install the most up-to-date version</p>
<div class="sourceCode" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb1-1"><a href="#cb1-1"></a>devtools<span class="op">::</span><span class="kw">install_github</span>(<span class="st">&quot;stemangiola/tidyHeatmap&quot;</span>)</span></code></pre></div>
<p>To install the most stable version (however please keep in mind that this package is under a maturing lifecycle stage)</p>
<div class="sourceCode" id="cb2"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb2-1"><a href="#cb2-1"></a><span class="kw">install.packages</span>(<span class="st">&quot;tidyHeatmap&quot;</span>)</span></code></pre></div>
</div>
<div id="contribution" class="section level2">
<h2>Contribution</h2>
<p>If you want to contribute to the software, report issues or problems with the software or seek support please open an issue <a href="https://github.com/stemangiola/tidyHeatmap/issues">here</a></p>
</div>
<div id="input-data-frame" class="section level2">
<h2>Input data frame</h2>
<p>The heatmaps visualise a multi-element, multi-feature dataset, annotated with independent variables. Each observation is a element-feature pair (e.g., person-physical characteristics).</p>
<table>
<thead>
<tr class="header">
<th>element</th>
<th>feature</th>
<th>value</th>
<th>independent_variables</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><code>chr</code> or <code>fctr</code></td>
<td><code>chr</code> or <code>fctr</code></td>
<td><code>numeric</code></td>
<td>…</td>
</tr>
</tbody>
</table>
<p>Let’s transform the mtcars dataset into a tidy “element-feature-independent variables” data frame. Where the independent variables in this case are ‘hp’ and ‘vs’.</p>
<div class="sourceCode" id="cb3"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb3-1"><a href="#cb3-1"></a>mtcars_tidy =<span class="st"> </span></span>
<span id="cb3-2"><a href="#cb3-2"></a><span class="st">    </span>mtcars <span class="op">%&gt;%</span><span class="st"> </span></span>
<span id="cb3-3"><a href="#cb3-3"></a><span class="st">    </span><span class="kw">as_tibble</span>(<span class="dt">rownames=</span><span class="st">&quot;Car name&quot;</span>) <span class="op">%&gt;%</span><span class="st"> </span></span>
<span id="cb3-4"><a href="#cb3-4"></a><span class="st">    </span></span>
<span id="cb3-5"><a href="#cb3-5"></a><span class="st">    </span><span class="co"># Scale</span></span>
<span id="cb3-6"><a href="#cb3-6"></a><span class="st">    </span><span class="kw">mutate_at</span>(<span class="kw">vars</span>(<span class="op">-</span><span class="st">`</span><span class="dt">Car name</span><span class="st">`</span>, <span class="op">-</span>hp, <span class="op">-</span>vs), scale) <span class="op">%&gt;%</span></span>
<span id="cb3-7"><a href="#cb3-7"></a><span class="st">    </span></span>
<span id="cb3-8"><a href="#cb3-8"></a><span class="st">    </span><span class="co"># tidyfy</span></span>
<span id="cb3-9"><a href="#cb3-9"></a><span class="st">    </span><span class="kw">gather</span>(Property, Value, <span class="op">-</span><span class="st">`</span><span class="dt">Car name</span><span class="st">`</span>, <span class="op">-</span>hp, <span class="op">-</span>vs)</span>
<span id="cb3-10"><a href="#cb3-10"></a></span>
<span id="cb3-11"><a href="#cb3-11"></a>mtcars_tidy</span></code></pre></div>
<pre><code>## # A tibble: 288 x 5
##    `Car name`           hp    vs Property  Value
##    &lt;chr&gt;             &lt;dbl&gt; &lt;dbl&gt; &lt;chr&gt;     &lt;dbl&gt;
##  1 Mazda RX4           110     0 mpg       0.151
##  2 Mazda RX4 Wag       110     0 mpg       0.151
##  3 Datsun 710           93     1 mpg       0.450
##  4 Hornet 4 Drive      110     1 mpg       0.217
##  5 Hornet Sportabout   175     0 mpg      -0.231
##  6 Valiant             105     1 mpg      -0.330
##  7 Duster 360          245     0 mpg      -0.961
##  8 Merc 240D            62     1 mpg       0.715
##  9 Merc 230             95     1 mpg       0.450
## 10 Merc 280            123     1 mpg      -0.148
## # … with 278 more rows</code></pre>
</div>
<div id="plot" class="section level2">
<h2>Plot</h2>
<p>For plotting, you simply pipe the input data frame into heatmap, specifying:</p>
<ul>
<li>The rows, cols relative column names (mandatory)</li>
<li>The value column name (mandatory)</li>
<li>The annotations column name(s)</li>
</ul>
<p>mtcars</p>
<div class="sourceCode" id="cb5"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb5-1"><a href="#cb5-1"></a>mtcars_heatmap =<span class="st"> </span></span>
<span id="cb5-2"><a href="#cb5-2"></a><span class="st">    </span>mtcars_tidy <span class="op">%&gt;%</span><span class="st"> </span></span>
<span id="cb5-3"><a href="#cb5-3"></a><span class="st">        </span><span class="kw">heatmap</span>(<span class="st">`</span><span class="dt">Car name</span><span class="st">`</span>, Property, Value ) <span class="op">%&gt;%</span></span>
<span id="cb5-4"><a href="#cb5-4"></a><span class="st">        </span><span class="kw">add_tile</span>(hp)</span>
<span id="cb5-5"><a href="#cb5-5"></a></span>
<span id="cb5-6"><a href="#cb5-6"></a>mtcars_heatmap</span></code></pre></div>
<p><img src="" /><!-- --></p>
</div>
<div id="save" class="section level2">
<h2>Save</h2>
<div class="sourceCode" id="cb6"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb6-1"><a href="#cb6-1"></a>mtcars_heatmap <span class="op">%&gt;%</span><span class="st"> </span><span class="kw">save_pdf</span>(<span class="st">&quot;mtcars_heatmap.pdf&quot;</span>)</span></code></pre></div>
</div>
<div id="grouping" class="section level2">
<h2>Grouping</h2>
<p>We can easily group the data (one group per dimension maximum, at the moment only the vertical dimension is supported) with dplyr, and the heatmap will be grouped accordingly</p>
<div class="sourceCode" id="cb7"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb7-1"><a href="#cb7-1"></a>mtcars_tidy <span class="op">%&gt;%</span><span class="st"> </span></span>
<span id="cb7-2"><a href="#cb7-2"></a><span class="st">    </span><span class="kw">group_by</span>(vs) <span class="op">%&gt;%</span></span>
<span id="cb7-3"><a href="#cb7-3"></a><span class="st">    </span><span class="kw">heatmap</span>(<span class="st">`</span><span class="dt">Car name</span><span class="st">`</span>, Property, Value ) <span class="op">%&gt;%</span></span>
<span id="cb7-4"><a href="#cb7-4"></a><span class="st">    </span><span class="kw">add_tile</span>(hp)</span></code></pre></div>
<p><img src="" /><!-- --></p>
</div>
<div id="custom-palettes" class="section level2">
<h2>Custom palettes</h2>
<p>We can easily use custom palette, using strings, hexadecimal color character vector,</p>
<div class="sourceCode" id="cb8"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb8-1"><a href="#cb8-1"></a>mtcars_tidy <span class="op">%&gt;%</span><span class="st"> </span></span>
<span id="cb8-2"><a href="#cb8-2"></a><span class="st">    </span><span class="kw">heatmap</span>(</span>
<span id="cb8-3"><a href="#cb8-3"></a>        <span class="st">`</span><span class="dt">Car name</span><span class="st">`</span>, </span>
<span id="cb8-4"><a href="#cb8-4"></a>        Property, </span>
<span id="cb8-5"><a href="#cb8-5"></a>        Value,</span>
<span id="cb8-6"><a href="#cb8-6"></a>        <span class="dt">palette_value =</span> <span class="kw">c</span>(<span class="st">&quot;red&quot;</span>, <span class="st">&quot;white&quot;</span>, <span class="st">&quot;blue&quot;</span>)</span>
<span id="cb8-7"><a href="#cb8-7"></a>    )</span></code></pre></div>
<p><img src="" /><!-- --></p>
<p>Or a grid::colorRamp2 function for higher flexibility</p>
<div class="sourceCode" id="cb9"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb9-1"><a href="#cb9-1"></a>mtcars_tidy <span class="op">%&gt;%</span><span class="st"> </span></span>
<span id="cb9-2"><a href="#cb9-2"></a><span class="st">    </span><span class="kw">heatmap</span>(</span>
<span id="cb9-3"><a href="#cb9-3"></a>        <span class="st">`</span><span class="dt">Car name</span><span class="st">`</span>, </span>
<span id="cb9-4"><a href="#cb9-4"></a>        Property, </span>
<span id="cb9-5"><a href="#cb9-5"></a>        Value,</span>
<span id="cb9-6"><a href="#cb9-6"></a>        <span class="dt">palette_value =</span> circlize<span class="op">::</span><span class="kw">colorRamp2</span>(<span class="kw">c</span>(<span class="op">-</span><span class="dv">2</span>, <span class="dv">-1</span>, <span class="dv">0</span>, <span class="dv">1</span>, <span class="dv">2</span>), viridis<span class="op">::</span><span class="kw">magma</span>(<span class="dv">5</span>))</span>
<span id="cb9-7"><a href="#cb9-7"></a>    )</span></code></pre></div>
<p><img src="" /><!-- --></p>
</div>
<div id="multiple-groupings-and-annotations" class="section level2">
<h2>Multiple groupings and annotations</h2>
<div class="sourceCode" id="cb10"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb10-1"><a href="#cb10-1"></a>tidyHeatmap<span class="op">::</span>pasilla <span class="op">%&gt;%</span></span>
<span id="cb10-2"><a href="#cb10-2"></a><span class="st">    </span><span class="kw">group_by</span>(location, type) <span class="op">%&gt;%</span></span>
<span id="cb10-3"><a href="#cb10-3"></a><span class="st">    </span><span class="kw">heatmap</span>(</span>
<span id="cb10-4"><a href="#cb10-4"></a>            <span class="dt">.column =</span> sample,</span>
<span id="cb10-5"><a href="#cb10-5"></a>            <span class="dt">.row =</span> symbol,</span>
<span id="cb10-6"><a href="#cb10-6"></a>            <span class="dt">.value =</span> <span class="st">`</span><span class="dt">count normalised adjusted</span><span class="st">`</span></span>
<span id="cb10-7"><a href="#cb10-7"></a>        ) <span class="op">%&gt;%</span></span>
<span id="cb10-8"><a href="#cb10-8"></a><span class="st">    </span><span class="kw">add_tile</span>(condition) <span class="op">%&gt;%</span></span>
<span id="cb10-9"><a href="#cb10-9"></a><span class="st">    </span><span class="kw">add_tile</span>(activation)</span></code></pre></div>
<p><img src="" /><!-- --></p>
</div>
<div id="annotation-types" class="section level2">
<h2>Annotation types</h2>
<p><strong>This feature requires &gt;= 0.99.20 version</strong></p>
<p>“tile” (default), “point”, “bar” and “line” are available</p>
<div class="sourceCode" id="cb11"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb11-1"><a href="#cb11-1"></a><span class="co"># Create some more data points</span></span>
<span id="cb11-2"><a href="#cb11-2"></a>pasilla_plus =<span class="st"> </span></span>
<span id="cb11-3"><a href="#cb11-3"></a><span class="st">    </span>tidyHeatmap<span class="op">::</span>pasilla <span class="op">%&gt;%</span></span>
<span id="cb11-4"><a href="#cb11-4"></a><span class="st">        </span>dplyr<span class="op">::</span><span class="kw">mutate</span>(<span class="dt">act =</span> activation) <span class="op">%&gt;%</span><span class="st"> </span></span>
<span id="cb11-5"><a href="#cb11-5"></a><span class="st">        </span>tidyr<span class="op">::</span><span class="kw">nest</span>(<span class="dt">data =</span> <span class="op">-</span>sample) <span class="op">%&gt;%</span></span>
<span id="cb11-6"><a href="#cb11-6"></a><span class="st">        </span>dplyr<span class="op">::</span><span class="kw">mutate</span>(<span class="dt">size =</span> <span class="kw">rnorm</span>(<span class="kw">n</span>(), <span class="dv">4</span>,<span class="fl">0.5</span>)) <span class="op">%&gt;%</span></span>
<span id="cb11-7"><a href="#cb11-7"></a><span class="st">        </span>dplyr<span class="op">::</span><span class="kw">mutate</span>(<span class="dt">age =</span> <span class="kw">runif</span>(<span class="kw">n</span>(), <span class="dv">50</span>, <span class="dv">200</span>)) <span class="op">%&gt;%</span></span>
<span id="cb11-8"><a href="#cb11-8"></a><span class="st">        </span>tidyr<span class="op">::</span><span class="kw">unnest</span>(data) </span>
<span id="cb11-9"><a href="#cb11-9"></a></span>
<span id="cb11-10"><a href="#cb11-10"></a><span class="co"># Plot</span></span>
<span id="cb11-11"><a href="#cb11-11"></a>pasilla_plus <span class="op">%&gt;%</span></span>
<span id="cb11-12"><a href="#cb11-12"></a><span class="st">        </span><span class="kw">heatmap</span>(</span>
<span id="cb11-13"><a href="#cb11-13"></a>            <span class="dt">.column =</span> sample,</span>
<span id="cb11-14"><a href="#cb11-14"></a>            <span class="dt">.row =</span> symbol,</span>
<span id="cb11-15"><a href="#cb11-15"></a>            <span class="dt">.value =</span> <span class="st">`</span><span class="dt">count normalised adjusted</span><span class="st">`</span></span>
<span id="cb11-16"><a href="#cb11-16"></a>        ) <span class="op">%&gt;%</span></span>
<span id="cb11-17"><a href="#cb11-17"></a><span class="st">    </span><span class="kw">add_tile</span>(condition) <span class="op">%&gt;%</span></span>
<span id="cb11-18"><a href="#cb11-18"></a><span class="st">    </span><span class="kw">add_point</span>(activation) <span class="op">%&gt;%</span></span>
<span id="cb11-19"><a href="#cb11-19"></a><span class="st">    </span><span class="kw">add_tile</span>(act) <span class="op">%&gt;%</span></span>
<span id="cb11-20"><a href="#cb11-20"></a><span class="st">    </span><span class="kw">add_bar</span>(size) <span class="op">%&gt;%</span></span>
<span id="cb11-21"><a href="#cb11-21"></a><span class="st">    </span><span class="kw">add_line</span>(age)</span></code></pre></div>
<p><img src="" /><!-- --></p>
</div>



<!-- code folding -->


<!-- dynamically load mathjax for compatibility with self-contained -->
<script>
  (function () {
    var script = document.createElement("script");
    script.type = "text/javascript";
    script.src  = "https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML";
    document.getElementsByTagName("head")[0].appendChild(script);
  })();
</script>

</body>
</html>
